package com.xd.xinan.mh_ftp.controller;

import com.xd.xinan.mh_ftp.service.MhFtpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class MhFtpController {

    @Autowired
    MhFtpService mhFtpService;

    @GetMapping("getFileList")
    public Map<String, Object> getFileList() throws Exception {
        Map<String, Object> fileNames = mhFtpService.getFileNames("/", "");
        return fileNames;
    }
}
